package day20170427;

public class Student {
	/**
	 * 学生年龄
	 */
	public Integer age = 100;
	
	/**
	 * 学生名字
	 */
	private String name = "zhangsan";
	
	/**
	 * 生成set/get方法
	 * @return
	 */
	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public int add(int a, int b){
		return a + b;
	}
	
	/**
	 * 构造方法
	 * @param age
	 * @param name
	 */
	public Student(Integer age, String name) {
		super();
		this.age = age;
		this.name = name;
	}
	public Student(){}
	
	/**
	 * 重写toString
	 */
	@Override
	public String toString() {
		return "Student [age=" + age + ", name=" + name + "]";
	}
}
